The conventional lock is made mechanically. As the mechanical structure within the lock means is simple, without the complex and diversified mechanism, the conventional lock is thus easily opened either by master key or by trial and error. The present invention has overcome this defect and improved upon the conventional lock with a lock in which a cylindrical lock body with pins is opened or closed by the cylindrical key bar.